Pandas Series

Series

  • one-dimensional data
  • index is used to associate label into each element
import pandas as pd

certificates_earned = pd.Series(
    [8, 2, 5, 6],
    index=['Tom', 'Kris', 'Ahmad', 'Beau']
)

print(certificates_earned)
Tom      8
Kris     2
Ahmad    5
Beau     6
dtype: int64

Hmm, okay, so we must always convert any file to a "Dataframe"
for us to make pandas work on it

Oh, just by extracting 1 column already makes it a pandas series
So we can just say that dataframe are just a collection of more than one pandas series

Created: 2023-08-13